package com.zzxx.service.impl;

import com.github.pagehelper.PageHelper;
import com.github.pagehelper.PageInfo;
import com.zzxx.mapper.RoleMapper;
import com.zzxx.pojo.Role;
import com.zzxx.pojo.UserInfo;
import com.zzxx.service.RoleService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

@Service
public class RoleServiceImpl implements RoleService {
    @Autowired
    private RoleMapper roleMapper;

    @Override
    public PageInfo<Role> getAllRoles(Integer pageNum, Integer pageSize) {
        PageHelper.startPage(pageNum,pageSize);
        PageInfo<Role> pageInfo = new PageInfo<>(roleMapper.getAllRoles());
        return pageInfo;
    }
}
